package com.blb.zycommunity.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 楼栋 
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Data
@ColumnWidth(25)                                //列宽
@HeadFontStyle(fontHeightInPoints = 20)         //标题行高
@ContentFontStyle(fontHeightInPoints = 12)      //内容行高
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, fillBackgroundColor = -1)
@TableName("zy_building")
@ApiModel(value = "ZyBuilding对象", description = "楼栋 ")
public class ZyBuilding implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ExcelProperty("楼栋id")
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("楼栋id")
    private String buildingId;

    @ExcelProperty("楼栋名称")
    @ApiModelProperty("楼栋名称")
    private String buildingName;

    @ExcelProperty("楼栋编码")
    @ApiModelProperty("楼栋编码")
    private String buildingCode;

    @ExcelProperty("楼栋面积")
    @ApiModelProperty("楼栋面积")
    private BigDecimal buildingAcreage;

    @ExcelIgnore
    @ApiModelProperty("小区id")
    private String communityId;

    @ExcelIgnore
    @ApiModelProperty("创建者")
    private String createBy;

    @ExcelProperty("创建时间")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ExcelIgnore
    @ApiModelProperty("更新者")
    private String updateBy;

    @ExcelIgnore
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    private String remark;

    @TableField(exist = false)
    private List<ZyBuilding> children;

    //小区名称
    @ExcelProperty("小区名称")
    @TableField(exist = false)
    private String communityName;

    @TableField(exist = false)
    private List<ZyUnit> units;



}
